﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TableTemplate.aspx.cs" Inherits="Sample.TableTemplate" %>
<%@ Register Assembly="System.Web.Ajax" Namespace="System.Web.UI" TagPrefix="ajax" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body xmlns:sys="javascript:Sys">
    <form id="form1" runat="server">
    <ajax:AjaxScriptManager ID="AjaxScriptManager1" runat="server">
         <Scripts>
            <asp:ScriptReference Path="~/Scripts/MicrosoftAjaxTemplates.debug.js" />
        </Scripts>
   </ajax:AjaxScriptManager>
   <script type="text/javascript">
        var dt = [ { ID: 12, Name : 'Dua belas'}, { ID: 13, Name: 'Tiga belas'}];
        Sys.onReady(function() {

            $create(Sys.UI.DataView,
            { "autoFetch": true, "data": dt, "id": "DataView1",
                "itemPlaceholder": $get("itemPlaceholder"),
                "itemTemplate": $get("itemTmp"), "selectedItemClass": "selected-row"
            }, null, null, $get("DataView1"));
        });
   </script>
    <div>
        <div id="itemTmp" class="sys-template">
            <span sys:innertext="{binding ID}"></span> - 
            <span sys:innertext="{binding Name}"></span>
        </div>
        <div id="DataView1" >
            <div class="pholde">
                <div id="itemPlaceholder" class="pholder">
                    
                </div>
            </div>
        </div>    
    </div>
    </form>
</body>
</html>
